if getaProp(getaProp(gObjects, #ButterFlySeen), #State) = #seen then
if getaProp(VOBJ, #State) = #open then
playSound("B16fxfil.aif", #keyframeCast)
if (getaProp(HOBJ, #State) = #open) and (getaProp(FOBJ, #State) = #open) then
BallonFillTank()
end if
else
if getaProp(VOBJ, #State) = #close then
stopsound("B16fxfil.aif")
BallonTurnOffGas()
end if
end if
end if
end
on DoBBGasSwitch
set HOBJ to getaProp(gObjects, #BBHose)
set VOBJ to getaProp(gObjects, #BBvalve)
set FOBJ to getaProp(gObjects, #BBGasSwitch)
set GOBJ to getaProp(gObjects, #BBgage)
if (getaProp(FOBJ, #State) = #open) and (getaProp(getaProp(gObjects, #ButterFlySeen), #State) = #seen) then
playSound("B16fxvlv.aif", #keyframeCast)
else
stopsound("B16fxvlv.aif")
end if
if (getaProp(FOBJ, #State) = #open) and (getaProp(HOBJ, #State) = #open) and (getaProp(VOBJ, #State) = #open) and (getaProp(getaProp(gObjects, #ButterFlySeen), #State) = #seen) then
BallonFillTank()
else
if (getaProp(FOBJ, #State) = #open) and (getaProp(HOBJ, #State) = #close) then
BallonTurnOffGas()
DrainTank()
else
if getaProp(FOBJ, #State) = #close then
BallonTurnOffGas()
end if
end if
end if
end
on BallonFillTank
playSound("B16FXhss.aif", #keyframeCast)
MakeDynamic(#BBgage, #State, #on)
Startthetimer(30, "MoveBallonGage", #BBvalve)
end
on BallonTurnOffGas
set HOBJ to getaProp(gObjects, #BBHose)
set VOBJ to getaProp(gObjects, #BBvalve)
set GOBJ to getaProp(gObjects, #BBgage)
MakeDynamic(#BBgage, #State, #off)
if not voidp(getaProp(VOBJ, #timer)) then
set howmany to count(getaProp(VOBJ, #timer))
repeat with thisTimer = 1 to howmany
set killtimer to getAt(getaProp(VOBJ, #timer), 1)
DeletetheTimer(killtimer)
end repeat
end if
end
on MoveBallonGage
set BOBJ to getaProp(gObjects, #BBallon)
set GOBJ to getaProp(gObjects, #BBgage)
if getaProp(GOBJ, #State) = #off then
exit
end if
if getaProp(GOBJ, #DisplayState) = #FULL then
if getaProp(BOBJ, #Explode) = #false then
setaProp(BOBJ, #explodeTimer, the ticks)
end if
MakeDynamic(#BBallon, #Explode, #Pending)
if the ticks > (getaProp(BOBJ, #explodeTimer) + 300) then
BallonBlowUp()
end if
if (getaProp(BOBJ, #Launch) = #false) and (getaProp(BOBJ, #Explode) <> #true) then
Startthetimer(30, "MoveBallonGage", #BBvalve)
end if
else
if getaProp(GOBJ, #DisplayState) = 20 then
playSound("B16wng.aif", #keyframeCast)
MakeDynamic(#BBgage, #DisplayState, #FULL)
Startthetimer(30, "MoveBallonGage", #BBvalve)
set the castNum of sprite getaProp(GOBJ, #SpriteNum) to getaProp(getaProp(GOBJ, #cast), #FULL)
set explosionChannel to playSound("B16expl.aif", #keyframeCast)
DelObjects([#BallonControls])
set the castNum of sprite 1 to the number of cast "cNullSprite"
stopsound("B16fxfil.aif")
repeat while soundBusy(explosionChannel)
CursorandUpdate()
end repeat
genexitkf(#BDIE)
end
on DoBBFlint
set BOBJ to getaProp(gObjects, #BBallon)
set HOBJ to getaProp(gObjects, #BBHose)
set VOBJ to getaProp(gObjects, #BBvalve)
set FOBJ to getaProp(gObjects, #BBGasSwitch)
set GOBJ to getaProp(gObjects, #BBgage)
if (getaProp(GOBJ, #DisplayState) >= 19) or ((getaProp(GOBJ, #DisplayState) = #FULL) and (getaProp(FOBJ, #State) = #open) and (getaProp(getaProp(gObjects, #ButterFlySeen), #State) = #seen)) then
if getaProp(getaProp(gObjects, #BBallon), #solved) = #true then
set gKeyRef to #B12B
else
if getaProp(getaProp(gObjects, #BBallon), #solved) = #false then
set gKeyRef to #B12A
end if
end if
return #B11
end
on calcTransToB04 Test
if Test = #Debug then
return [#B04A, #B04B]
end if
if (getaProp(gCurKeyList, #RefName) = #B12A) or (getaProp(gCurKeyList, #RefName) = #B12B) then
set gKeyRef to #B12
return #B04
end if
if getaProp(getaProp(gObjects, #BBallon), #solved) = #true then
return #B04B
else
if getaProp(getaProp(gObjects, #BBallon), #solved) = #false then
return #B04A
end if
end if
end
on calcTransToB07 Test
if (getaProp(gCurKeyList, #RefName) = #B12A) or (getaProp(gCurKeyList, #RefName) = #B12B) then
set gKeyRef to #B12
return #B07
end if
end
on calcTransToB08 Test
if Test = #Debug then
return [#B08A, #B08B]
end if
if getaProp(getaProp(gObjects, #BBallon), #solved) = #true then
return #B08B
else
if getaProp(getaProp(gObjects, #BBallon), #solved) = #false then
return #B08A
end if
end if
end
on calcTransToB12 Test
if Test = #Debug then
return [#B12A, #B12B]
end if
if getaProp(getaProp(gObjects, #BBallon), #solved) = #true then
return #B12B
else
if getaProp(getaProp(gObjects, #BBallon), #solved) = #false then
return #B12A
end if
end if
end
on calcTransToB13 Test
if Test = #Debug then
return [#B13A, #B13B]
end if
if getaProp(getaProp(gObjects, #BBallon), #solved) = #true then
return #B13B
else
if getaProp(getaProp(gObjects, #BBallon), #solved) = #false then
return #B13A
end if
end if
end
on calcTransToB19 Test
if Test = #Debug then
return [#B19A, #B19B]
end if
if getaProp(getaProp(gObjects, #BBallon), #solved) = #true then
return #B19B
else
if getaProp(getaProp(gObjects, #BBallon), #solved) = #false then
return #B19A
end if
end if
end
on calcTransToB28 Test
if Test = #Debug then
return [#B28A, #B28B, #B28C, #B28D]
end if
if getaProp(getaProp(gObjects, #BRocket), #solved) = #false then
if getaProp(getaProp(gObjects, #BBridge), #State) = #open then
return #B28B
else
if getaProp(getaProp(gObjects, #BBridge), #State) = #close then
return #B28A
end if
end if
else
if getaProp(getaProp(gObjects, #BRocket), #solved) = #true then
if getaProp(getaProp(gObjects, #BBridge), #State) = #open then
return #B28C
else
if getaProp(getaProp(gObjects, #BBridge), #State) = #close then
return #B28D
end if
end if
end if
end if
end
on calcTransToB31 Test
if Test = #Debug then
return [#B31A, #B31B, #B31C, #B31D]
end if
if getaProp(getaProp(gObjects, #BRocket), #solved) = #false then
if getaProp(getaProp(gObjects, #BBridge), #State) = #open then
return #B31B
else
if getaProp(getaProp(gObjects, #BBridge), #State) = #close then
return #B31A
end if
end if
else
if getaProp(getaProp(gObjects, #BRocket), #solved) = #true then
if getaProp(getaProp(gObjects, #BBridge), #State) = #open then
return #B31C
else
if getaProp(getaProp(gObjects, #BBridge), #State) = #close then
return #B31D
end if
end if
end if
end if
end
on calcTransToB30 Test
if Test = #Debug then
return [#B30]
end if
if getaProp(getaProp(gObjects, #BRocket), #solved) = #false then
return #B30
else
if getaProp(getaProp(gObjects, #BRocket), #solved) = #true then
return #empty
end if
end if
end
on calcTransToB10 Test
if Test = #Debug then
return [#B10A, #B10B]
end if
if (getaProp(getaProp(gObjects, #BBridge), #State) = #close) and (getaProp(getaProp(gObjects, #BRocket), #solved) = #false) and (getaProp(getaProp(gObjects, #BBallon), #solved) = #false) then